<HTML><HEAD><TITLE>library(suspend)</TITLE></HEAD><BODY>
[ <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]<H1>library(suspend)</H1>
Lazy-checking versions of arithmetic primitives, and the suspend-attribute
<H2>Predicates</H2>
<BLOCKQUOTE>
<DL>
<DT><A HREF="HNN-2.html"><STRONG>?Vars #:: ?Range</STRONG></A></DT>
<DD>Range constraint combined with integrality constraint</DD>
<DT><A HREF="HNN-3.html"><STRONG>#::(?Vars, ?Range, ?Bool)</STRONG></A></DT>
<DD>Reified range constraint combined with integrality constraint</DD>
<DT><A HREF="HL-2.html"><STRONG>?Expr1 #< ?Expr2</STRONG></A></DT>
<DD>The integer value of Expr1 is less than the integer value of Expr2.</DD>
<DT><A HREF="HL-3.html"><STRONG>#<(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="HE-2.html"><STRONG>?Expr1 #= ?Expr2</STRONG></A></DT>
<DD>The integer value of Expr1 is equal to the integer value of Expr2.</DD>
<DT><A HREF="HE-3.html"><STRONG>#=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="HEL-2.html"><STRONG>?Expr1 #=< ?Expr2</STRONG></A></DT>
<DD>The integer value of Expr1 is less than or equal to the integer value of Expr2.</DD>
<DT><A HREF="HEL-3.html"><STRONG>#=<(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="HG-2.html"><STRONG>?Expr1 #> ?Expr2</STRONG></A></DT>
<DD>The integer value of Expr1 is greater than the integer value of Expr2.</DD>
<DT><A HREF="HG-3.html"><STRONG>#>(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="HGE-2.html"><STRONG>?Expr1 #>= ?Expr2</STRONG></A></DT>
<DD>The integer value of Expr1 is greater than or equal to the integer value of Expr2.</DD>
<DT><A HREF="HGE-3.html"><STRONG>#>=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="HRE-2.html"><STRONG>?Expr1 #\= ?Expr2</STRONG></A></DT>
<DD>The integer value of Expr1 is not equal to the integer value of Expr2.</DD>
<DT><A HREF="HRE-3.html"><STRONG>#\=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="SNN-2.html"><STRONG>?Vars #:: ?Range</STRONG></A></DT>
<DD>Pure range constraint</DD>
<DT><A HREF="SNN-3.html"><STRONG>$::(?Vars, ?Range, ?Bool)</STRONG></A></DT>
<DD>Reified pure range constraint</DD>
<DT><A HREF="SL-2.html"><STRONG>?Expr1 $< ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is less than the value of Expr2.</DD>
<DT><A HREF="SL-3.html"><STRONG>$<(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="SE-2.html"><STRONG>?Expr1 $= ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is equal to the value of Expr2.</DD>
<DT><A HREF="SE-3.html"><STRONG>$=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="SEL-2.html"><STRONG>?Expr1 $=< ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is less than or equal to the value of Expr2.</DD>
<DT><A HREF="SEL-3.html"><STRONG>$=<(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="SG-2.html"><STRONG>?Expr1 $> ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is greater than the value of Expr2.</DD>
<DT><A HREF="SG-3.html"><STRONG>$>(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="SGE-2.html"><STRONG>?Expr1 $>= ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is greater than or equal to the value of Expr2.</DD>
<DT><A HREF="SGE-3.html"><STRONG>$>=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="SRE-2.html"><STRONG>?Expr1 $\= ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is not equal to the value of Expr2.</DD>
<DT><A HREF="SRE-3.html"><STRONG>$\=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="NN-2.html"><STRONG>?Vars :: ?Range</STRONG></A></DT>
<DD>Range constraint with optional integrality constraint</DD>
<DT><A HREF="NN-3.html"><STRONG>::(?Var, ?Range, ?Bool)</STRONG></A></DT>
<DD>Reified range constraint with optional integrality constraint</DD>
<DT><A HREF="L-2.html"><STRONG>?Expr1 < ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is less than the value of Expr2.</DD>
<DT><A HREF="L-3.html"><STRONG><(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="ENE-2.html"><STRONG>?Expr1 =:= ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is equal to the value of Expr2.</DD>
<DT><A HREF="ENE-3.html"><STRONG>=:=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="EL-2.html"><STRONG>?Expr1 =< ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is less than or equal to the value of Expr2.</DD>
<DT><A HREF="EL-3.html"><STRONG>=<(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="EG-2.html"><STRONG>?Expr1 => ?Expr2</STRONG></A></DT>
<DD>If Expr1 arithmetically evaluates to 1, so does Expr2 (implication)</DD>
<DT><A HREF="EG-3.html"><STRONG>=>(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified boolean operation</DD>
<DT><A HREF="ERE-2.html"><STRONG>?Expr1 =\= ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is not equal to the value of Expr2.</DD>
<DT><A HREF="ERE-3.html"><STRONG>=\=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="G-2.html"><STRONG>?Expr1 > ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is greater than the value of Expr2.</DD>
<DT><A HREF="G-3.html"><STRONG>>(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="GE-2.html"><STRONG>?Expr1 >= ?Expr2</STRONG></A></DT>
<DD>The value of Expr1 is greater than or equal to the value of Expr2.</DD>
<DT><A HREF="GE-3.html"><STRONG>>=(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified arithmetic comparison</DD>
<DT><A HREF="and-2.html"><STRONG>?Expr1 and ?Expr2</STRONG></A></DT>
<DD>Both Expr1 and Expr2 arithmetically evaluate to 1</DD>
<DT><A HREF="and-3.html"><STRONG>and(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified boolean operation</DD>
<DT><A HREF="integers-1.html"><STRONG>integers(?Vars)</STRONG></A></DT>
<DD>Constrain Vars to be integers</DD>
<DT><A HREF="neg-1.html"><STRONG>neg ?Expr</STRONG></A></DT>
<DD>Expr arithmetically evaluates to 0</DD>
<DT><A HREF="neg-2.html"><STRONG>neg(?Expr, ?Bool)</STRONG></A></DT>
<DD>Reified boolean operation</DD>
<DT><A HREF="or-2.html"><STRONG>?Expr1 or ?Expr2</STRONG></A></DT>
<DD>At least one of Expr1 or Expr2 arithmetically evaluate to 1</DD>
<DT><A HREF="or-3.html"><STRONG>or(?Expr1, ?Expr2, ?Bool)</STRONG></A></DT>
<DD>Reified boolean operation</DD>
<DT><STRONG>portray_delay_reified(?, ?)</STRONG></DT>
<DD>No description available</DD>
<DT><STRONG>portray_delayed_goals(?, ?)</STRONG></DT>
<DD>No description available</DD>
<DT><A HREF="reals-1.html"><STRONG>reals(?Vars)</STRONG></A></DT>
<DD>Constrain Vars to be a number or list of numbers</DD>
<DT><STRONG>tr_if_suspend(?, ?, ?)</STRONG></DT>
<DD>No description available</DD>
</DL>
</BLOCKQUOTE>
<H2>Other Exports</H2>
<BLOCKQUOTE><DL>
<DT><STRONG>export macro(if / 2, tr_if_suspend / 3, [clause])</STRONG></DT><DD></DD>
<DT><STRONG>export op(750, fx, [neg])</STRONG></DT><DD></DD>
<DT><STRONG>export op(760, yfx, [and])</STRONG></DT><DD></DD>
<DT><STRONG>export op(770, yfx, [or])</STRONG></DT><DD></DD>
<DT><STRONG>export op(780, yfx, [=>])</STRONG></DT><DD></DD>
<DT><STRONG>export op(700, xfx, [#::, $::, $=, $\=, $>=, $=<, $>, $<])</STRONG></DT><DD></DD>
<DT><STRONG>export portray(delay_until_ground / 3, portray_delayed_goals / 2, [goal])</STRONG></DT><DD></DD>
<DT><STRONG>export portray(delay_reified / 4, portray_delay_reified / 2, [goal])</STRONG></DT><DD></DD>
</DL></BLOCKQUOTE>
<H2>Description</H2>
    This library provides the following:
<UL>
    <LI>the <B>suspend</B> pseudo-solver for general arithmetic
    <LI>the <B>suspend</B> attribute
</UL>
    The suspend pseudo-solver for arithmetic comparisons simply consists
    of suspending (lazy-checking) versions of all arithmetic comparisons
    (&gt;/2, #&gt;/2, etc).  These all suspend until all their variables
    have been instantiated, then they wake up and test the condition,
    succeeding or failing as appropriate. Together with a search routine,
    this provides the means to implement simple test-and-generate algorithms.
<P>
    The suspend-attribute is a basis for the implementation of similar
    user-defined data-driven computations that react to variable instantiation,
    variable binding, or general variable-constraining events.  The suspend-
    attribute defines the following three suspension lists (and thus waking
    conditions) for a variable:
<DL>
    <DT><STRONG>inst</STRONG><DD>
    	woken when variable is instantiated.
    <DT><STRONG>bound</STRONG><DD>
    	woken when variable is bound, even to an other variable.
    <DT><STRONG>constrained</STRONG><DD>
    	woken when variable is (further) constrained.  This is
	triggered by the notify_constrained built-in.
</DL>
    These three lists can be used as waking conditions in the suspend/3,4
    built-in. Variables using the suspend-attribute do not have to be
    declared specially, the attribute is implicitly created when needed.
    
<H2>About</H2><UL COMPACT>
<LI><STRONG>Author: </STRONG>Micha Meier, ECRC, Joachim Schimpf, ECRC and IC-Parc
<LI><STRONG>Copyright &copy; </STRONG>Cisco Systems, Inc
<LI><STRONG>Date: </STRONG>$Date: 2009/02/19 05:38:37 $
</UL>
<HR>Generated from suspend.eci on 2009-05-27 01:25
</BODY></HTML>
